package com.producer;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * User: lixiao
 * Created Date: 2020/7/18 11:27
 */
@RestController
@RequestMapping(value = "/prductior")
public class Controller {

    @Value("${producer.config.instance}")
    private int number;

    @RequestMapping(value = "date",method = RequestMethod.GET)
    public String date(){
        return "instance:"+number+"data:"+new Date();
    }
}